/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.expert.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.chlitina.store.common.persistence.BaseDao;
import com.chlitina.store.common.persistence.BaseDaoImpl;
import com.chlitina.store.modules.expert.entity.SolutionFaceProductMix;

/**
 *  方案产品步骤DAO接口
 * @author liujiang
 * @version 2013-08-19
 */
public interface SolutionFaceProductMixDao extends SolutionFaceProductMixDaoCustom, CrudRepository<SolutionFaceProductMix, Long> {
	@Query("select m from SolutionFaceProductMix m, SolutionFaceProductMixStoreType t, SolutionFaceProductMixLocationSeason l "
			+ " where m.id = t.solutionFaceProductMix.id and m.id = l.solutionFaceProductMix.id and"
			+ " m.solutionFaceProductStep.id = ?1 and l.systemDefinitionAreaSeason.id = ?2 and t.storeType.id = ?3")
	public List<SolutionFaceProductMix> findByStep(long stepId, long locationSeason, long storeTypeId);
}

/**
 * DAO自定义接口
 * @author liujiang
 */
interface SolutionFaceProductMixDaoCustom extends BaseDao<SolutionFaceProductMix> {

}

/**
 * DAO自定义接口实现
 * @author liujiang
 */
@Component
class SolutionFaceProductMixDaoImpl extends BaseDaoImpl<SolutionFaceProductMix> implements SolutionFaceProductMixDaoCustom {

}
